//! find two item in the list that would add up to the credit
// the lower bound of complexity of algorithms to solve this
// problem is O(n^2).
void match_2(unsigned long credit, unsigned long* prices, size_t num, size_t& pos1, size_t& pos2) {

    for (pos1=0; pos1<num-1; pos1++)
        for (pos2=pos1+1; pos1<num; )
            if (credit == prices[pos1] + prices[pos2++])
                return;

}
